<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="/layui/css/layui.css"/>
	</head>
	<body>
	<table class="layui-table" style=" width:2000px;margin: 0px auto;">
		<colgroup>
			<col width="150">
			<col width="200">
			<col>
		</colgroup>
		<thead>
			<tr>
				<th>今日话题标题</th>
			</tr>
		</thead>
		<tbody id="tab">
		</tbody>
	</table>
		<button class="layui-btn layui-btn-primary" onclick="btnClick1()">抓取qq首页标题</button>
		<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="/bck/static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			
			
			function btnClick1(){
				$.ajax({
					type:"post",
					url:"/homework/zq.php",
					dataType:"json",
					success:function(mgs){
						for(var a = 0; a<mgs.length;a++)
						{
							$("#tab").append("<tr><td>"+mgs[a]+"</td></tr>");
						}
						console.log(mgs);
					}
				});
			}
			
		</script>
	</body>
</html>
